package com.hopu.v1.mapper.admin.system;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hopu.v1.pojo.system.Organization;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author YwaiX
 * @since 2024-09-12
 */
public interface OrganizationMapper extends BaseMapper<Organization> {


    /**
     * 获取一级组织
     * @return
     */
    List<Organization> getOrganizaList();

    /**
     * 查询二级组织
     * @param pid
     * @return
     */
    List<Organization> getOranizaByPid(Integer pid);
    
    /**
     * 根据父级id获取所有子级id
     * @param pid
     */
    List<Integer> getOrganizationIds(Integer pid);
}
